/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tutorial.BuilderSiDAO.BuilderPattern;

import tutorial.BuilderSiDAO.commons.ptBuilderPersoana;
import tutorial.BuilderSiDAO.customGUI.PersoanaGUIOutput;

/**
 * Aceasta este implentarea interfetei Exporter care populeaza un form
 * Form-ul este pasat ca argument la constructor
 * acest lucru se numeste Dependency Injection
 * @author Boogie
 */
public class SwingExporter implements ptBuilderPersoana.Exporter{
    private final PersoanaGUIOutput output;

    
    public SwingExporter(PersoanaGUIOutput output) {
        this.output = output;
    }

    
    @Override
    public void exportNume(String nume) {
        output.getNumeLabel().setText(nume);
    }

    @Override
    public void exportPrenume(String prenume) {
        output.getPrenumeLabel().setText(prenume);
    }

    @Override
    public void exportAdresa(String adresa) {
        output.getAdresaLabel().setText(adresa);
    }
    
}
